
<?php
    $method='textField';
    switch($type){
        case 'img':
            $method='fileField';
            break;
        case 'dropDown':
            $method='dropDownList';
            break;
    }
?>

<?php if($type=='img'): ?>
    <div class="input-short-img input-short">
        <label class="input-short-img"><?php echo $model->value; ?></label>
        <?php echo $form->$method($model,'value',array(
            'class'=>'input-short-img input-short',
        )); ?>
    </div>
<?php elseif($type=='dropDown'): ?>
    <?php if($model->key=='default_language'): ?>
        <?php echo $form->$method($model,'value',$model->dropDownLang,array(
            'class'=>'input-short',
        )); ?>
    <?php else: ?>
        <?php if($model->id): ?>
            <?php Yii::app()->controller->renderPartial('admin.views.settings.__dropDownList',array(
                'model'=>$model,
                'form'=>$form,
            )); ?>
        <?php else: ?>
            <?php Yii::app()->controller->renderPartial('admin.views.settings.__settingValueFieldForDropDown',array(
                'model'=>$model,
                'form'=>$form,
            )); ?>
        <?php endif; ?>
    <?php endif; ?>
<?php elseif($type=='int'): ?>
    <?php echo $form->$method($model,'value',array(
        'class'=>'input-short',
    )); ?>
<?php elseif($type=='text'): ?>
    <?php $this->widget('MultiLangFields',array('settings'=>array(
        'model'=>$model,
        'name'=>'value',
        'divClass'=>'formline',
        'inputClass'=>'input-short',
    ))); ?>
<?php endif; ?>